From: Marco Trevisan (TreviƱo) Date: Thu, 9 May 2019 19:51:17 +0000 (-0500) Subject: keyboard: Unset Idle ID before removing it X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~216 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2702a82896ab38d044a231b4387f8f5ab48d984f;p=gnome-shell.git keyboard: Unset Idle ID before removing it When toggling keyboard various times, we might get an error because trying to disconnect an idle that isn't set anymore. This is because when we remove the idle, we don't unset the ID. Also clear the idle when destroying the keyboard. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/540 --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 6d4585de8..df2e3ed2f 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1144,6 +1144,7 @@ var Keyboard = class Keyboard { this._keyboardController.disconnect(this._keypadVisibleId); if (this._focusNotifyId) global.stage.disconnect(this._focusNotifyId); + this._clearShowIdle(); this._keyboard = null; this.actor.destroy(); this.actor = null; @@ -1229,6 +1230,7 @@ var Keyboard = class Keyboard { if (!this._showIdleId) { this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { this.show(Main.layoutManager.focusIndex); + this._showIdleId = 0; return GLib.SOURCE_REMOVE; }); GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell] this.show');